{% extends 'rango/base.html' %}
		{% load staticfiles %}
		{% block title %} Search {% endblock %}
		{% block body_block %}
		<div>
			<h1>Search with Rango</h1>
			<br/>
			<form class="form-inline" id="user_form" 
				method="post" action="{% url 'search' %}">
			{% csrf_token %}
			<div class="input-group">
				<input class="form-control" type="text" size="50" 
					name="query" value="" id="query" />
			</div>
			<button class="btn btn-primary" type="submit" name="submit"
				 value="Search">Search</button>
			</form>	
			<div>
			{% if result_list %}
			<h3>Results</h3>
			<!-- Display search results in an ordered list -->
				<div class="list-group">
				{% for result in result_list %}
					<div class="list-group-item">
					<h4 class="list-group-item-heading">
					<a href="{{ result.link }}">{{ result.title }}</a>
					</h4>
					<p class="list-group-item-text">{{ result.summary }}</p>
					</div>
				{% endfor %}
				</div>
			{% endif %}
			</div>
		</div>	
		{% endblock %}
	